
public class StartBedAssignmentEvent extends EventBase {

	public int duration;
	
	public StartBedAssignmentEvent(PatientBase patient, Nurse nurse) {
		super(patient);
		duration = 5;	///PLACE DISTRIBUTION HERE
		this.eventNurse = nurse;
	}
	
	public void execute() {
		super.execute();
		eventNurse.setStatus(true);
		
		EventBase event =  new EndBedAssignmentEvent(eventPatient, eventNurse);
		event.scheduledTime = Simulator.getCurrentTime() + duration;
		
		eventPatient.timeArray[3]=Simulator.getCurrentTime();
		eventNurse.setNextDecisionPoint(event.scheduledTime);
		int idletime = (Simulator.getCurrentTime() - eventNurse.getLastStatusChange());
		eventNurse.addIdleTime(idletime);
		eventNurse.setLastStatusChange(Simulator.getCurrentTime());
		
		
		
		Simulator.addEvent(event);
	}
}